﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using WQLWebAPI.Api.Middleware.Exceptions;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace WQLWebAPI.Api.Controllers
{

    [ApiController]
    public class BaseApiController : ControllerBase
    {
        protected ActionResult ResultResponse(bool result, string msg)
        {
            if (result)
            {
                return Ok(msg+"成功");
            }
            else
            {
                return BadRequest(msg+"失败");
            }
        }
    }
}